package com.enhe.gck.com.oracle;

import com.alibaba.fastjson.JSONObject;
import com.enhe.gck.communal.PublicConstant;
import lombok.Data;

import java.math.BigDecimal;
import java.util.List;

@Data
public class OracleEntity {
    @Data
    public static class MoneyWeight{
        private BigDecimal weight;
        private BigDecimal money;
        private BigDecimal taxRate;
    }

    @Data
    public static class Parameter{
        private String siCode;
        private String startDate;
        private String endDate;

        private String transactionCurrency;
        private String baseCurrency;
    }

    @Data
    public static class Custom{
        private String customerId;
        private String customerName;
        private String subsidiaryName;
        private String isInactive;
    }
    @Data
    public static class Supplier{
        private String vendorId;
        private String vendorNum;
        private String vendorName;
        private String isInactive;
    }
    @Data
    public static class Material{
        private String itemId;
        private String itemNum;
        private String itemName;
        private String isInactive;
        private String lastModifiedDate;
        private String unit;
        private String categoryType;
        private String maxType;
        private String middleType;
        private String mixType;
        private String specification;
    }
    @Data
    public static class Order{
        private String subsidiaryNo;
        private String exchangeRate;
        private String currency;
        private String documentNo;
        private String date;
        private String entityId;
        private String entityName;
        private String deliveryOption;
        private String pickupLocation;
        private String licenseNo;
        private String freight;
        private String car;
        private String carDepartment;
        private String mileage;
        private String memo;
        private List<Line> lines;

        private String ehId;
        @Data
        public static class Line{
            private String itemId;
            private String itemNum;
            private String unit;
            private String quantity;
            private String taxRate;
            private String itemTaxRate;
            private String itemRate;
            private String amount;
            private String memo;
        }

        public String getDocumentNo() {
            return subsidiaryNo + "_" +documentNo;
        }
    }
    @Data
    public static class Recharge{
        /**
         * 子公司代码
         */
        private String subsidiaryNo;
        /**
         * 币种（国际币种代码eg.CNY USD）
         */
        private String currency;
        /**
         * 订单编码
         */
        private String documentNo;
        /**
         * 日期，格式yyyy/MM/dd
         */
        private String date;
        /**
         * NS客户主键
         */
        private String entityId;
        /**
         * 	客户名称
         */
        private String entityName;
        /**
         * 汇率
         */
        private String rate;
        /**
         * NS银行科目编码
         */
        private String bankAccount;
        /**
         * 金额
         */
        private String amount;
        /**
         * 备注
         */
        private String memo;


        private String ehId;



        private String originalcurrency;//实际收款币种
        private String originalamount;//实际收款金额
        private String payexchangerate;//GCK子公司传原币换算成美金的汇率

        public String getDocumentNo() {
            return subsidiaryNo + "_" + documentNo;
        }
    }

    @Data
    public static class DeleteOrder{
        private String salesNum;

        private String ehId;

        public String getSalesNum() {
            return PublicConstant.subsidiaryNo + "_" + salesNum;
        }
    }

    /**
     * 提货点
     */
    @Data
    public static class Pickup{
        private String subareaName;
        private String siCode;
        private String contact;
        private String phone;
        private String zip;
        private String fare;
        private String taxCode;
        private String taxFare;
        private String customerId;
        private String ehId;
        private String customerCode;
        private String address;
    }


    @Data
    public static class ReturnData{
        private boolean isOk;
        private JSONObject data;
    }

    @Data
    public static class Rate{
        private String exchangeRate;
        private String effectiveDate;
        private String baseCurrency;
        private String transactionCurrency;
    }
}
